﻿<%@ Page Language="C#" MasterPageFile="~/View/Master.Master" AutoEventWireup="true" CodeBehind="AssignDisbursementItem.aspx.cs" Inherits="PresentationLayer.View.StoreClerk.AssignDisbursementItem" %>



<%@ Register src="../mainMenu.ascx" tagname="mainMenu" tagprefix="uc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 200px;
        }
        .style3
        {
            width: 245px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


     <table width="100%">
    <tr>
        <td style="height:auto;width:200px;vertical-align:top;">    
            <uc1:mainMenu ID="mainMenu1" runat="server" />
        </td>
        <td>
<!-- 
-->
    <div >
    <center>
        <h2><u>Assign Items to Departments</u></h2></center>
        <table style="width:100%">
            <tr>
                <td class="style1">
                    Category</td>
                <td class="style3">
                    <asp:Label ID="lbCategory" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    Stationery Description</td>
                <td class="style3">
                    <asp:Label ID="lbItem" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    Total Needed Qty</td>
                <td class="style3">
                    <asp:Label ID="lbNeededQty" runat="server" Text="Label"></asp:Label>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
                    Retrieved Qty From Inventory</td>
                <td class="style3">
                    <asp:Literal ID="lbAqty" runat="server"></asp:Literal>
                    <asp:TextBox ID="txtRetrieveQty" runat="server" Width="54px" 
                        AutoPostBack="True" ontextchanged="txtRetrieveQty_TextChanged"></asp:TextBox>
                    <asp:Button ID="btnUpdateQtyInventory" runat="server" Text="Save" Width="57px" 
                        Visible="False" />

                    <br /><br />

                </td>
                <td>
                    <asp:Label ID="Label5" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>

                </td>
            </tr>
            <tr>
                <td class="style1">
                    <asp:Label ID="lbleft" runat="server" Visible="False">Left Quantity</asp:Label>
                </td>
                <td class="style3">
                    <asp:Label ID="lbLQty" runat="server" Visible="False">0</asp:Label>

                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
    
    </div>
    <br />
     <asp:Label ID="lbError" runat="server" ForeColor="Red" Font-Bold="True"></asp:Label>
            <asp:Panel ID="Panel1" runat="server" Height="100%">
           
    <br />
    <br />
    <asp:GridView ID="gvAssignList" runat="server" 
        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
        GridLines="None" Width="778px" onrowcommand="gvAssignList_RowCommand">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="No">
            <ItemTemplate>
                <%# Container.DataItemIndex + 1 %>
            </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Department">
                 <ItemTemplate>
                    <asp:Label ID="Lb2" runat="server" Text='<%# Eval("deptName") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("deptName") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Uncollected Time">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server"  Text='<%# Eval("unCollectedTime") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server"  Text='<%# Eval("unCollectedTime") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="This Week RequestedQty">
                <ItemTemplate>
                    <asp:Label ID="thisqty" runat="server" Text='<%# Eval("ThisWeekQty") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("ThisWeekQty") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Previous UnfulfiledQty">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("unFullFilledQty") %>'></asp:Label>
                </ItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("unFullFilledQty") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="Total Requested Qty">
                <ItemTemplate>
                    <asp:Label ID="out" runat="server" Text='<%# Eval("TotalOutStandingQty") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("TotalOutStandingQty") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="AssignedQty">
                <ItemTemplate>
                   
                                <asp:TextBox ID="txtAssignQty" runat="server" Text='<%# Eval("assignedQty") %>' 
                                    Width="44px"></asp:TextBox>
                     
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:Button ID="Button1" runat="server" CausesValidation="false" CommandName="Assign" 
                    CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" Text="Assign" Enabled='<%# Eval("flag") %>'/>  
                              
                    <asp:HiddenField ID="hdnDeptId" runat="server" value='<%# Eval("deptId") %>'/>
                    <asp:HiddenField ID="hdnTotReqQty" runat="server" value='<%# Eval("TotalReqQty") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:HiddenField ID="hdnItemId" runat="server" />
            <br />
            <asp:Button ID="btnSubmit" runat="server" Text="Submit" Width="92px" 
        onclick="btnSubmit_Click" />
            <br />
            <br />
            <br />
            <br />
            <br />
            <br />
            <br />
 </asp:Panel>
    


     <asp:Panel ID="Panel2" runat="server" visible="false" Height="100%">
            
    <br />
    <asp:GridView ID="GridView1" runat="server" Visible="False">
    </asp:GridView>
    
    <br />
   
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView2" runat="server">
        </asp:GridView>
    </p>
    <p>
        &nbsp;</p>
    <p>
        <asp:GridView ID="GridView3" runat="server">
        </asp:GridView>
        <asp:Literal ID="Literal1" runat="server"></asp:Literal>
    </p>
    </asp:Panel>
    <br />   
           
  <!-- 
-->

</td></tr></table>
</asp:Content>
